﻿/*
    Copyright (c) 2013-2014 Contributors as noted in the AUTHORS file

    This file is part of  RuNet Importer for NodeXL.

    RuNet Importer is free software; you can redistribute it and/or modify it under
    the terms of the Microsoft Public License (Ms-PL), or (at your option) any later 
	version.

    RuNet Importer is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
	See the Microsoft Public License for more details.

    You should have received a copy of the Microsoft Public License
    along with this program.  If not, see <http://www.microsoft.com/en-us/openness/licenses.aspx>.
*/

using System;
using Smrf.AppLib;
using rcsir.net.common.Network;
using rcsir.net.common.Utilities;

namespace rcsir.net.ok.importer.Events
{
    public class GraphEventArgs : EventArgs
    {
        public enum Types
        {
            UserInfoLoaded,
            FriendsListLoaded,
            FriendsLoaded,
            AreGraphLoaded,
            MutualGraphLoaded,
            GraphGenerated
        };

        public readonly Types Type;
        public readonly JSONObject JData;

        public readonly VertexCollection<String> Vertices;
        public readonly EdgeCollection<String> Edges;
        public readonly AttributesDictionary<bool> DialogAttributes;
        public readonly AttributesDictionary<string> GraphAttributes;
        public readonly int Count;

        public GraphEventArgs(Types type, JSONObject data = null)
        {
            Type = type;
            JData = data;
        }

        public GraphEventArgs(Types type, int cunt)
        {
            Type = type;
            Count = cunt;
        }

        public GraphEventArgs(VertexCollection<String> vertices, EdgeCollection<String> edges, AttributesDictionary<bool> dialogAttributes, AttributesDictionary<string> graphAttributes)
        {
            Type = Types.GraphGenerated;
            Vertices = vertices;
            Edges = edges;
            DialogAttributes = dialogAttributes;
            GraphAttributes = graphAttributes;
        }
    }
}
